using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TimeWar.Octree;
using Microsoft.Xna.Framework;

namespace TimeWar
{
    public class CRenderedObjectOctreeLeaf : ITimeWarObject
    {
        protected CRenderedObject m_object = null;


        public CRenderedObjectOctreeLeaf(CRenderedObject obj)
        {
            m_object = obj;
        }

        public Vector3 Vector
        {
            get
            {
                return m_object.Position;
            }
        }

        public CRenderedObject Value
        {
            get
            {
                return m_object;
            }
        }

        public float X
        {
            get
            {
                return m_object.PositionX;
            }
            set
            {
                m_object.PositionX = value;
            }
        }


        public float Y
        {
            get
            {
                return m_object.PositionY;
            }
            set
            {
                m_object.PositionY = value;
            }
        }


        public float Z
        {
            get
            {
                return m_object.PositionZ;
            }
            set
            {
                m_object.PositionZ = value;
            }
        }

        public GameState Update(TimeSpan gameTime, TimeSpan elapsedTime)
        {
            //in XBox 360, I call CRenderedObject.Update(), but in Windows, it calls subclass 
            return m_object.Update(gameTime, elapsedTime);
            
        }

        public void Render()
        {
            m_object.Render();
        }

    }
}